﻿using AMAP.Domain;
using AMAP.ServiceClasses.Common;
using AMAP.ServiceInterfaces;
using AMAP.ServiceInterfaces.Common;
using System.Linq;

namespace AMAP.ServiceClasses
{
    public class DeliveryService : BaseRepositoryService<Delivery>, IDeliveryService
    {
        public DeliveryService(IDatabaseFactory databaseFactory)
            : base(databaseFactory)
        {
        }

        public int GetCountBasedOnBasketId(int BasketId)
        {
            return this.dataContext.DeliverySet.Count(b => b.BasketId == BasketId);
        }
    }
}
